﻿@model IEnumerable<WriterStars.Model.Order>

<div class="table-responsive">
    <table class="table table-striped table-condensed">
        <thead>
            <tr>
                <th>Created by</th>
                <th>Info</th>
                <th>Details</th>
                <th>Expected price</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
@foreach (var item in Model)
{
    <tr>
        <td>
            @item.User.FirstName @item.User.LastName <br />
            @item.CreationDate
        </td>
        <td>
            @item.OrderInfo
        </td>
        <td>
            @item.Description
        </td>
        <td>
            @item.ExpectedPrice
        </td>
        <td>
            <select class="orderState" data-order-id="@item.Id">
                <option value="@((int)item.OrderState)" selected>@item.OrderState.ToString()</option>
                <option value="@((int)OrderState.Pending)">@OrderState.Pending.ToString()</option>
                <option value="@((int)OrderState.Negotiate)">@OrderState.Negotiate.ToString()</option>
                <option value="@((int)OrderState.Accepted)">@OrderState.Accepted.ToString()</option>
                <option value="@((int)OrderState.InProgress)">@OrderState.InProgress.ToString()</option>
                <option value="@((int)OrderState.Finished)">@OrderState.Finished.ToString()</option>
            </select>
        </td>
    </tr>
}
        </tbody>
    </table>
</div>